from sqlalchemy.orm import Session

from crud import CourseAdminCrud
from schema.QuerySchema import QueryBase, SubjectSectionQuery
from schema.TeachingSchema import CourseStageSubjectInfo, CourseStageInfo, SubjectSectionInfo, SubjectInfo, CourseInfo


class CourseAdminController:
    @staticmethod
    def add_course(courseInfo: CourseInfo, db: Session):
        return CourseAdminCrud.add_course(courseInfo, db)

    @staticmethod
    def mod_course(courseInfo: CourseInfo, db: Session):
        return CourseAdminCrud.mod_course(courseInfo, db)

    @staticmethod
    def query_course_all(db: Session):
        return CourseAdminCrud.query_course_all(db)
    @staticmethod
    def query_course_by_page(query_base: QueryBase, db: Session):
        return CourseAdminCrud.query_course_by_page(query_base, db)

    @staticmethod
    def add_subject(subjectInfo: SubjectInfo, db: Session):
        return CourseAdminCrud.add_subject(subjectInfo, db)

    @staticmethod
    def mod_subject(subjectInfo: SubjectInfo, db: Session):
        return CourseAdminCrud.mod_subject(subjectInfo, db)

    @staticmethod
    def query_subject_by_page(query_base: QueryBase, db: Session):
        return CourseAdminCrud.query_subject_by_page(query_base, db)

    @staticmethod
    def add_subject_section(subjectSectionInfo: SubjectSectionInfo, db: Session):
        return CourseAdminCrud.add_subject_section(subjectSectionInfo, db)

    @staticmethod
    def mod_subject_section(subjectSectionInfo: SubjectSectionInfo, db: Session):
        return CourseAdminCrud.mod_subject_section(subjectSectionInfo, db)

    @staticmethod
    def query_subject_section_by_field(subjectSectionQuery: SubjectSectionQuery, db: Session):
        return CourseAdminCrud.query_subject_section_by_field(subjectSectionQuery, db)

    @staticmethod
    def delete_subject_section(subject_id: int, section_id: int, db: Session):
        return CourseAdminCrud.delete_subject_section(subject_id, section_id, db)

    @staticmethod
    def add_course_stage(courseStageInfo: CourseStageInfo, db: Session):
        return CourseAdminCrud.add_course_stage(courseStageInfo, db)

    @staticmethod
    def mod_course_stage(courseStageInfo: CourseStageInfo, db: Session):
        return CourseAdminCrud.mod_course_stage(courseStageInfo, db)

    @staticmethod
    def query_course_stage_by_field(course_content_id: int, db: Session):
        return CourseAdminCrud.query_course_stage_by_field(course_content_id, db)

    @staticmethod
    def delete_course_stage(course_stage_id: int, db: Session):
        return CourseAdminCrud.delete_course_stage(course_stage_id, db)

    @staticmethod
    def add_course_stage_subject(courseStageSubjectInfo: CourseStageSubjectInfo, db: Session):
        return CourseAdminCrud.add_course_stage_subject(courseStageSubjectInfo, db)

    @staticmethod
    def mod_course_stage_subject(courseStageSubjectInfo: CourseStageSubjectInfo, db: Session):
        return CourseAdminCrud.mod_course_stage_subject(courseStageSubjectInfo, db)

    @staticmethod
    def query_course_stage_subject_by_field(course_stage_id: int, db: Session):
        return CourseAdminCrud.query_course_stage_subject_by_field(course_stage_id, db)

    @staticmethod
    def delete_course_stage_subject(course_stage_id: int, subject_id: int, db: Session):
        return CourseAdminCrud.delete_course_stage_subject(course_stage_id, subject_id, db)
